package cn.yitun.chat.yitunservercommonlib.converter.dto2po.common;

import cn.yitun.chat.yitunservercommonlib.crud.yitun.BaseConverter;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.common.DictTypeDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.common.DictType;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface DictTypeConverter extends BaseConverter<DictTypeDto, DictType> {

    DictTypeConverter INSTANCE = Mappers.getMapper(DictTypeConverter.class);
    DictTypeDto do2dto(DictType info);

    List<DictTypeDto> do2dto(List<DictType> doList);

    @InheritInverseConfiguration
    DictType dto2do(DictTypeDto dto);
    @InheritInverseConfiguration
    List<DictType> dto2do(List<DictTypeDto> dtoList);
}
